package cn.com.egova.demoapplication.tools;

import android.animation.TypeEvaluator;

import cn.com.egova.demoapplication.bean.Point;

/**
 * Created by yuanchao on 2017/3/8.
 */

public class PointEvaluator implements TypeEvaluator<Point>{
    @Override
    public Point evaluate(float fraction, Point startValue, Point endValue) {
        int x = (int) (startValue.getX()+fraction*(endValue.getX()-startValue.getX()));
        int y = (int) (startValue.getY()+fraction*(endValue.getY()-startValue.getY()));
        return new Point(x,y);
    }
}
